package com.iplant.base.po.enums;

public enum DBEnumType implements BaseEnum {
	/**
	 * MySQL
	 */
	Default(0, "MySQL"),
	/**
	 * SCH
	 */
	MySQL(1, "MySQL"),
	/**
	 * APP
	 */
	SQLServer(2, "SQLServer"),
	/**
	 * APP
	 */
	Oracle(3, "Oracle"),
	
	Access(4, "Access");
	
	private int value;
	private String label;

	private String remark = "";

	private DBEnumType(int value, String label) {
		this.value = value;
		this.label = label;
	}

	private DBEnumType(int value, String label, String remark) {
		this.value = value;
		this.label = label;
		this.remark = remark;
	}

	/**
	 * 通过 value 的数值获取枚举实例
	 *
	 * @param val
	 * @return
	 */
	public static DBEnumType getEnumType(int val) {
		for (DBEnumType type : DBEnumType.values()) {
			if (type.getValue() == val) {
				return type;
			}
		}
		return Default;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	 
}
